
using System;
using System.Globalization;
using System.IO;

using CStock;
using CUtil;

using System.Diagnostics;

namespace CStock
{
	/// <summary>
	/// Summary description for Quote.
	/// </summary>
	public class Quote: QuoteBase, IQuote
	{
	

		#region fields

		private double hIGH ;
		private double lOW ;
		private double oPENc ;
        private System.Int64 vOLUME;
        private double change;
		#endregion

		#region Contructors
		private void initQuote()
		{
			this.DATE = new DateTime(0);
			this.OPENc = 0.0f;
			this.HIGH = 0.0f;
			this.LOW = 0.0f;
			this.CLOSEc = 0.0f;
			this.VOLUME = 0;
		}
		public Quote()
		{
			initQuote();
		}
        public Quote(IQuote quClone)
            
        {
            this.date = quClone.DATE;
            this.time_OfDay = quClone.TIME_OfDay;
            this.oPENc = quClone.OPENc;
            this.hIGH = quClone.HIGH;
            this.lOW = quClone.LOW;
            this.cLOSEc = quClone.CLOSEc;
            this.change = quClone.Change;
            this.vOLUME = 0;
        }

        public Quote(DateTime newDate, double newOpen, double newHigh, double newLow, double newClose, double newChange, int newVolume)
            : this()
		{
			this.date = newDate;
			this.oPENc = newOpen;
			this.hIGH = newHigh;
			this.lOW =newLow;
			this.cLOSEc =newClose;
            this.change = newChange;
			this.vOLUME = newVolume;
            
		}
        
		#endregion

		#region Interface IQuote - Properties
		
		public double HIGH 
		{
			get
			{
				return this.hIGH;
			}
			set
			{
				this.hIGH = value;
			}
		}
		
		public double LOW 
		{
			get
			{
				return this.lOW;
			}
			set
			{
				this.lOW = value;
			}
		}
		
	
		
		public double OPENc 
		{
			get
			{
				return this.oPENc;
			}
			set
			{
				this.oPENc = value;
			}
		}


        public System.Int64 VOLUME 
		{
			get
			{
				return this.vOLUME;
			}
			set
			{
				this.vOLUME = value;
			}
		}
        //[System.Xml.Serialization.XmlIgnoreAttribute()]
        public double Change
        {
            get
            {
                return this.change;
            }
            set
            {
                this.change = value;
            }
        }

		#endregion

        #region general

    

        public override string ToString()
        {
            return this.cLOSEc.ToString() + "; " + this.date.ToShortDateString();
        }

        #endregion

    }
}
